home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / dviware / quicspool / readme.nr < prev   
Text File  |  1990-10-01  |  28KB  |  594 lines

  1. .\" $Header: README.nr,v 1.1 88/01/15 12:14:04 simpson Rel $
  2. .\" $Log:    README.nr,v $
  3. .\" Revision 1.1  88/01/15  12:14:04  simpson
  4. .\" initial release
  5. .\" 
  6. .\" Revision 0.2  88/01/13  14:31:43  simpson
  7. .\" removed reference to pre-made PK files
  8. .\" 
  9. .\" Revision 0.1  88/01/07  08:27:30  simpson
  10. .\" beta test
  11. .\" 
  12. .\" This document uses the -ms macros
  13. .if t .ds Tx T\h'-.1667m'\v'.22m'E\h'-.125m'\v'-.22m'X
  14. .if n .ds Tx TeX
  15. .if t .ds LX L\v'-.22m'a\v'.22m'T\h'-.1667m'\v'.22m'E\h'-.125m'\v'-.22m'X
  16. .if n .ds LX LaTeX
  17. .TL
  18. QMS and Talaris Laser Printer Software for 
  19. the 4.2 BSD Spooling System
  20. .AU
  21. Scott Simpson
  22. .AI
  23. TRW Space & Defense Sector
  24. One Space Park, R2/2133
  25. Redondo Beach, CA 90278
  26. (213) 812-5338
  27. {decvax,ucbvax,ihnp4}!trwrb!simpson
  28. trwrb!simpson@trwind.trw.com
  29. .AB
  30. .PP
  31. This is the installation guide for the 4.2 BSD QMS and Talaris
  32. laser printer software.  It is a long document, so before you
  33. install anything get a cup of coffee (or a beer),
  34. put your feet on the desk, and relax.  This will be
  35. a fun, hallucinogenic ride through installation land.
  36. .AE
  37. .SH
  38. The Name Of The Game
  39. .PP
  40. Many of you may not know the difference between a Talaris
  41. printer and a QMS printer.  Well, the difference is\-nothing.  Well,
  42. almost nothing.  Talaris puts new ROM fonts in their printer when they
  43. sell it to you but they just buy the printers from QMS and put their
  44. name on them.  QMS in turn buys their printer engines from Xerox,
  45. Canon and Ricoh and puts their controllers on them.  The end result is that
  46. consumers like you and I pay through the wazoo for everything.  Such
  47. is the way of the world.
  48. .SH
  49. In The Beginning...
  50. .PP
  51. Around 1985 I had
  52. written a QMS \*(Tx and troff driver for our QMS laser printers since at
  53. the time there were none available (or none that I knew of).  I made
  54. this driver compatible with an otroff (the C/A/T troff, not ditroff)
  55. driver called ``qcat'' from Mt. Xinu.  This driver maintained a state
  56. table on disk which stored information about the fonts currently
  57. residing in the printer.  Some type of state information needed to be
  58. stored since it was not possible to query the QMS printer to ask it
  59. what fonts it had downloaded or how much memory those fonts consumed.
  60. This seemed like a logical solution.
  61. .PP
  62. I didn't like the code so
  63. I rewrote it.  Before I rewrote the troff driver, I had given my \*(Tx
  64. driver to the University of Washington to distribute on the Unix \*(Tx
  65. tape.  After I had completed my troff driver, a number of people
  66. discovered my TRW telephone number and asked if they could have a copy
  67. of it (the driver, not my telephone number).  I freely gave away the
  68. software to interested parties.
  69. .SH
  70. Problems In Paradise
  71. .PP
  72. I immediately ran into some problems.  The otroff driver used
  73. proprietary fonts so when someone asked for the code, they needed to
  74. already have ``qcat'' and the fonts.  Freely distributable fonts were needed.
  75. .PP
  76. I also discovered some annoying problems with the \*(Tx and
  77. troff drivers.  First, the state table presents a consistency problem.
  78. If the printer is powered down or if fonts are downloaded without
  79. going through the driver software or the state table is inadvertently
  80. trashed, the table and the printer have different ideas about what
  81. fonts are loaded and they proceed to print funny documents often with
  82. many greek characters. (The character 0 is Gamma in \*(Tx fonts and the
  83. QMS printer prints character 0 when it can't find a letter in a
  84. certain font.)  This is very entertaining unless you are trying to get
  85. work done.  Users don't have a sense of humor.
  86. .PP
  87. Another more serious problem reared its ugly head.  The \*(Tx
  88. driver supported the ``\especial'' command of \*(Tx.  So, you could say
  89. ``\especial{overlay(/staff1/simpson/barchart)}'' and output the file
  90. barchart to the QMS printer at that point.  The file ``barchart'' would be
  91. a QMS QUIC file possibly generated by a graphics program.  Nice graphs
  92. and other wonderful pictures could be inserted into \*(Tx documents this
  93. way.  There is one problem:  the driver often ran as root.  So, the
  94. mischevious user could say ``\especial{overlay(/usr/lib/uucp/L.sys)}'' and
  95. merrily print out the contents of the UUCP password file.  This is not
  96. good.  A simple solution would be to change the uid of the driver to
  97. the person running the driver.  This works, but now you must make the
  98. state table writable by everyone so the driver can write it.  This is
  99. also not good.  A last solution would be to run as root, open the
  100. state table, leave it open and then change the uid.  This works, is
  101. secure and was not implemented.  Sorry.  (The new drivers do this and
  102. don't suffer security problems.)
  103. .PP
  104. During the next couple of years a few nice advances in
  105. technology occurred.  The very compact pk format font file was
  106. designed.  This font format stores the bit rasters as run lengths
  107. rather than bit maps.  It created a 78% reduction in font file disk
  108. space over the pxl format (which stores characters as bit maps) on our
  109. system.  Also, QMS added the ability to query the controller and ask
  110. it pertinent information about the status of the printer.  Information
  111. is provided about available font ram and the currently downloaded
  112. fonts.  This is very useful.  I congratulate QMS on doing something
  113. right.  Unfortunately, the way they implemented it was brain damaged.
  114. There are two ports on the QMS controller.  Ours are both serial lines
  115. although one used to be a parallel interface.  RS232 lines can
  116. talk both ways but the QMS dedicates one line for writing to the QMS
  117. printer and the other line (known as the debugger port) for reading
  118. status information.  It works but you have to dedicate two ports to
  119. each printer instead of one.  Not too painful.  Lastly, they added the
  120. ability to download font data in binary format instead of as ASCII hex
  121. characters.  This allows you to send half the amount of data down to
  122. the printer when downloading fonts compared to the ASCII hex format.
  123. Since much of the printer time is spent downloading fonts, this is
  124. actually quite useful.
  125. .PP
  126. In summary, the old driver is woefully out of date.  If you have
  127. it, burn it in effigy.
  128. .SH
  129. My Solution
  130. .PP
  131. My solution incorporates what I feel is the best solution so
  132. far.  I decided to write a set of filters to fit snugly in the 4.2BSD
  133. spooling system.
  134. My new otroff, ditroff and \*(Tx drivers query the QMS printers
  135. for font download and ram available information so the information is
  136. always correct, even if you re-power up the printer.  Also, my driver
  137. uses the new compact ``pk'' font format and converts fonts from ``pk'' format
  138. to QMS format on the fly.  Eight bit download format is used.
  139. .PP
  140. QMS font numbers are assigned ranges.  The font numbers
  141. 1-10000 are available for \*(Tx fonts and the range 10001-20000 are for
  142. troff fonts (both otroff and ditroff share the same fonts).  
  143. Consequently, you can not have more than 10000 \*(Tx or
  144. 10000 troff fonts.  If you run over this limit you are warped.  Font
  145. numbers are assigned in the following manner:  Each time the driver
  146. runs, it reads all the names in the font directory and assigns them
  147. numbers consecutively in the order they are found in the font
  148. directory.  This takes surprisingly little time.  If you add or delete
  149. files from the system font directory you will have to reset the printer since
  150. the numbers of the fonts in the printer and the mapping the drivers
  151. compute may not mesh.
  152. .SH
  153. Installation
  154. .PP
  155. There are a number of steps to follow to install the software.
  156. Follow them closely.  Don't be scared about the length.  I explain things
  157. in gory detail.
  158. .IP 1.
  159. You must have a running METAFONT and \fIgftopk\fR(1)
  160. to create the troff fonts.
  161. Copy the METAFONT file ``logodesign.mf'' in the directory
  162. ``mffiles'' to your METAFONT macro directory.
  163. Next, run the ``makefonts'' scripts in the directories ``wwfonts''
  164. and ``wbfonts''.  
  165. This assumes you have set up the mode ``qms'' for the Xerox and Ricoh
  166. engines and the mode ``imagen'' for the Canon engine.
  167. Our ``local.mf'' contains the lines
  168. .ID
  169. .ft CW
  170. mode_def imagen = % imagen mode: for the Imagen 8/300 (Canon engine)
  171.  proofing:=0;     % no, we're not making proofs
  172.  fontmaking:=1;   % yes, we are making a font
  173.  tracingtitles:=0;% no, don't show titles in the log
  174.  pixels_per_inch:=300;
  175.  blacker:=0;      % Canon engine is black enough
  176.  fillin:=.2;      % and it tends to fill in diagonals
  177.  o_correction:=.6;
  178.  enddef;
  179.  
  180. mode_def qms =    % qms mode: for the QMS (Xerox engine)
  181.  proofing:=0;     % no, we're not making proofs
  182.  fontmaking:=1;   % yes, we are making a font
  183.  tracingtitles:=0;% no, don't show titles in the log
  184.  pixels_per_inch:=300;
  185.  blacker:=.8;     % Values from Charles Karney, TUGboat, April 1987
  186.  fillin:=.2;
  187.  o_correction:=.4;  
  188.  enddef;
  189. .DE
  190. .ft R
  191. ``Local.mf'' is loaded when you create METAFONT.
  192. If you don't understand the concept of modes or how ``local.mf'' plays
  193. a part in all this, see The METAFONTbook.
  194. Running these two scripts will probably take a couple of days. Literally.
  195. .IP 2.
  196. Decide if you have device-independent troff.  This is easy.
  197. Did you send a lot of money to AT&T and get a tape in the mail?  If you
  198. did, you must unfortunately make some changes to the eqn and pic preprocessors
  199. that came in the distribution.
  200. These two processors take a 
  201. .B -T 
  202. option which designates which device to generate
  203. output for.
  204. We need to add the QMS printer as a valid device. 
  205. In the directory ``diffs'' are two context diffs suitable for input to
  206. Larry Wall's infamous 
  207. .I patch
  208. program.
  209. The eqn patch modifies the file ``io.c'' in the distribution.
  210. The pic patch modifies the file ``main.c'' in the distribution.  Modify
  211. your eqn and pic now.
  212. .IP 3.
  213. If you have multiple printers, let's first set up one printer at a time.
  214. You can come back to this step to install more printers when you are done
  215. if need be.
  216. Select two tty ports to use to talk to your printer.  
  217. That's right.  Each printer needs 
  218. .I two
  219. serial tty lines.
  220. If your printer has a parallel port, get
  221. it converted.  
  222. A parallel port will probably work but I have not tested it.  You are on
  223. your own if you don't convert to serial.
  224. Two types of flow control are used\-one type for each
  225. port.  The daughter board port uses hardware flow control.  The
  226. printer lowers DTR when the buffer is full and raises it when it is
  227. ready to accept data.  Since the computer is a DTE and the printer is
  228. a DTE, a null modem must be used to connect the computer and the
  229. printer.  
  230. The tty bits for the daughter board port are 
  231. specified in the ``/etc/printcap'' file and are
  232. set by lpr.  The tty bits are also read by my software to set the
  233. debugger port bits.  
  234. .IP
  235. Hardware flow control (DTR) is used for the daughter board port so
  236. ^S/^Q can be sent and not interpreted as flow control.  Unfortunately,
  237. the debugger port will not work with hardware flow control and ^S/^Q
  238. must be used.  
  239. Simply run a regular RS-232 line through from the debugger port to the
  240. computer.
  241. .IP
  242. All machines don't work as simply as this.  In fact, none of the machines
  243. I have tested the software on work as simply as this!
  244. Here are descriptions of what to do different for different machines.
  245. If your machine is not listed here, the software has not been tested on your
  246. machine and you need to figure it out.  When you do, let me know so I can
  247. share your experience with other users of the same equipment.
  248. .RS
  249. .IP PYRAMID
  250. The Pyramid does not use a
  251. normal null modem.  To create a null modem for the Pyramid, switch
  252. pins 2 and 3, 4 and 8, and connect pin 20 on one side to pins 5 and 6
  253. on the other side.  
  254. Connect lines 1, 7 and 22 straight through.
  255. I don't know why this works and even the people at
  256. RTOC (Pyramid's Remote Technical Operations Center) could not explain
  257. it to me.  
  258. .IP SUN
  259. I hooked the two lines up to the serial ports on the Sun CPU board.
  260. These ports are driven by the ``zs0'' driver in the kernel configuration
  261. file.
  262. The ``flags'' variable to the zs0 driver determines whether a modem
  263. can detect a carrier drop.
  264. If bit 0 of the flags variable is on, software carrier will be turned on
  265. the first port.
  266. If bit 1 of the flags variable is on, software carrier will be turned on
  267. the second port.
  268. We want to use hardware carrier on both ports so set the flags variable
  269. to 0x0 and reconfigure and reinstall the kernel if necessary.
  270. .IP
  271. A Sun null modem can be made by switching lines 2 and 3 and running line
  272. 7 straight through.  See the excellent Sun documentation.
  273. .IP "OTHER COMPUTERS"
  274. Here are some hints for other computers.
  275. First, check the documentation!
  276. This sounds completely obvious but it is amazing how many people don't do
  277. it.
  278. If the documentation does not describe how to make a null modem for hardware
  279. carrier, try using a normal null modem.
  280. On normal machines, a NULL modem is made by switching pins 2
  281. and 3, 6 and 20, and looping 4 back to 5.
  282. Lines 1, 7, 8 and 22 are connected straight through.
  283. .IP
  284. Often fast machines have front ends whose tty bits need to be configured.
  285. For example,
  286. the Pyramid has a couple of ioctl calls
  287. specific to it that must be used to really get flow control to work.
  288. In the file ``of.c'' in the ``src'' directory
  289. you will see a section demarcated ``#ifdef pyr''
  290. that really gets the flow control to work on the Pyramid since the
  291. Pyramid has a pseudo front-end called an ITP which has special ioctl
  292. calls.  
  293. You may have to change this to get this to work on your
  294. machine\-or maybe not.  You can usually check the include file
  295. ``/usr/include/sys/ioctl.h'' to see if your computer has such a special
  296. call.
  297. .RE
  298. .IP 4.
  299. Each printer has two queues\-one for portrait mode and one for landscape
  300. mode.
  301. The landscape queue retains the same name as the portrait queue but the
  302. landscape queue is suffixed with an `l'.
  303. For example, suppose you want to name
  304. your printer queue ``grumpy''.  You will create two queues: ``grumpy'' and
  305. ``grumpyl'' for portrait and landscape mode respectively.
  306. If you queue to the two different queues simultaneously, you obviously
  307. don't want both jobs printing at the same time!
  308. Pyramid has modified their ``lpd'' daemon to check if another job has
  309. the printer.  Sun hasn't.
  310. If your ``lpd'' does not check whether two jobs are
  311. using the same printer simultaneously, my software will check for it.
  312. In the ``src'' directory in the file ``of.c'' you will see two sections
  313. delimited by ``#if defined(sun)'' that lock out other print jobs.
  314. Define it in both places
  315. if your lpd does not lock out other processes.
  316. .IP 5.
  317. You'll now have to set up the correct interface options on your
  318. printer.  The interface options for the printer are the class 1 options
  319. and unfortunately cannot be set by software.  If you have a QMS 1200, QMS
  320. 1500 or
  321. QMS 2400,
  322. set the interface options
  323. 2 and 30 in class 1 using the panel.
  324. Do not set any other options within this class. 
  325. This is eight bit, no parity with hardware flow control.  
  326. If you have a QMS 800, set
  327. bit 2 on SWS 1 on, all others on SWS 1 off.
  328. Setting options is
  329. described in the User Guide and Daughter Board manuals.  The options in
  330. the other classes will be set by software and are specified in the
  331. configuration file (see step 10).  You will also need to set the dip
  332. switches on the QMS Daughter Board to the appropriate speed.  
  333. We use our printers at 9600 baud.  I couldn't get 19200 to work.  You 
  334. can try.
  335. Set bits 7 and 8 on, all others off, on switch S1 on the daughter board
  336. for 9600 baud.
  337. See the QMS RS-232 Daughter Board Operating Manual.
  338. .IP 6.
  339. Set the owner of the two tty lines to root and the group owner to
  340. daemon.  Set the permissions to 660.
  341. Turn off getty on the two tty lines by editing the ``/etc/ttys'' file.
  342. If you have a 4.2 BSD ``/etc/ttys'' file, set the first column to 0 to
  343. disable getty and the second column to the appropriate baud rate.
  344. Do a ``kill -HUP 1'' so init rereads the ``/etc/ttys'' file.
  345. .IP 7.
  346. There are a set of include files written here at TRW which declare
  347. machine specific C preprocessor #defines and macros.  
  348. Use of these symbolic
  349. names within programs makes them more portable, since you
  350. need only change the ``standard'' include files and the programs will port.
  351. The include files are only currently set up for a small variety of machines.
  352. You may have to add the appropriate values for your machine.
  353. .IP
  354. In the directory ``standard'', look at the files ``standenviron.h'' and
  355. ``standconst.h.''  If your machine type is not in there, add it and send
  356. me a message telling me what your additions are.  Please try to use the
  357. pre-defined C preprocessor variables as I did.  This makes things more 
  358. portable.
  359. .IP 8.
  360. The top level Makefile makes and installs everything.  You will need to set
  361. up some paths in it.  I strongly suggest that you use the paths distributed.
  362. Here is what the variables are:
  363. .RS
  364. .IP INCLUDE
  365. This distribution includes a set of libraries that you receive in addition
  366. to the printer filters.  The printer filters use these libraries so you
  367. must install them.  The libraries need some header files and the header
  368. files are put in this directory.  You must 
  369. .I "leave this variable as is."
  370. .IP FILTER
  371. This is where all the lpr filters are put.  You can change this to anything
  372. you want, but ``/usr/local/lib/lpr'' seems the most logical.
  373. .IP LIB
  374. This is where the bonus libraries are put.  The glob and profile library
  375. are quite useful.  The trw and qmsquery libraries aren't.
  376. .IP "WBTEXFONT and WWTEXFONT"
  377. This is where the write-black and write-white \*(Tx pk fonts are stored.
  378. There are two kinds of laser printers in this great big world of ours:
  379. write-black and write-white engines.
  380. Write-black printers write the black part with the laser and write-white
  381. write everything but the black part with the laser.
  382. To get the best looking output, you should use different fonts for each
  383. type of printer.  The QMS 
  384. 800 is a write-black printer.  The QMS 1200, QMS 1500 and
  385. QMS 2400 are write-white printers.  At our site, we only have QMS 1200, QMS
  386. 1500 and
  387. QMS 2400 printers so we don't have any write-black printers.  If we did,
  388. I would put the \*(Tx
  389. fonts in ``/usr/lib/tex/imagenfonts'' since the imagen 240
  390. laser printer is write-black.
  391. Also, you specify ``\emode:=imagen;'' to METAFONT when you want to get
  392. fonts for a write-black printer.
  393. We store our write-white fonts in ``/usr/lib/tex/qmsfonts'' since you
  394. say ``\emode:=qms;'' to get write-white fonts from METAFONT.  Our \*(Tx
  395. tfm files are stored in ``/usr/lib/tex/tfm'' since both write-black and
  396. write-white printers can use the same tfm files.  \*(Tx doesn't care about
  397. what type of printer you have so it only reads the files in the ``tfm''
  398. directory.  My driver only cares about the rasters and can get the widths
  399. from the pk file so it only reads the files in the ``imagenfonts'' and
  400. ``qmsfonts'' directories.  Whether you have a write-black/write-white
  401. printer or not, set both paths to an appropriate value.
  402. .IP OTROFFFONT
  403. This is the directory where the width tables for otroff are stored.
  404. This is always ``/usr/lib/font'' on every system I have ever seen.
  405. The rasters for old troff are discussed under DITROFFFONT.
  406. .IP DITROFFFONT
  407. This is the location of the ditroff width tables and the grandfather
  408. directory of the font raster files.
  409. Please leave it as ``/usr/lib/font/devqms''.  Ditroff likes to look
  410. there.
  411. In this directory will be created two more directories: ``wbfonts'' and
  412. ``wwfonts.''  You guessed it.  These are the write-black and write-white
  413. troff font directories.  Both otroff and ditroff share the same fonts
  414. so they don't have to download fonts very often if they run right after each
  415. other.  If you have ditroff, most people never use otroff again so this is
  416. not usually a problem anyway, but otroff is there if you need it.
  417. .IP BINARIES
  418. Along with the filters comes a few programs that manipulate fonts and such.
  419. This is the location to store those programs.
  420. .IP DOCILEUSER
  421. The \*(Tx and ditroff drivers can output a file directly to the printer
  422. during execution so that graphics can be included into text.
  423. This can present a security problem since they run as root.  To avoid this,
  424. the drivers open the tty lines to the printer and then change uid to the
  425. user they are processing the file for.  This solves our permission problems.
  426. Remote users don't have a uid on this machine so they switch to the uid
  427. given here.  Games seems docile enough.
  428. .RE
  429. .IP
  430. You must also change the values in a couple of scripts.  In the scripts
  431. .I glpr
  432. and 
  433. .I glpq 
  434. in the ``src'' directory
  435. change the ``printers'' variable to the name of your QMS printer queues.
  436. The landscape versions of the queues need not be given.
  437. If you don't have ditroff, you need to change the last line 
  438. of the ``qtroff.backup'' script from ``otroff'' to ``troff''.
  439. .IP 9.
  440. If you have ditroff, there is a program called ``makedev'' distributed with
  441. it.  This program takes a human readable DESC file and creates the ``DESC.out''
  442. binary file that ditroff reads.  Put this in your path now if you have it.
  443. Some systems have an ``/etc/makedev'' so you will want to put this program
  444. in your path before the system makedev.
  445. If you are using the C shell, you may have to type ``rehash''.
  446. .IP 10.
  447. Type ``make configure install'' as root in the home directory.
  448. Stand back.  This installs 
  449. everything. (At TRW, we use the ``Makefile.TRW'' makefile, since we have
  450. added extensive accounting for badge numbers, cost centers, charge numbers
  451. and session ids.  We had to modify our kernel to handle all these bizarre
  452. elements so you should never have a need to use this Makefile.)
  453. .IP 11.
  454. A configuration file is used by the software for each printer
  455. queue.  It is in \fIprofile\fP(5) format and should reside in the spooling
  456. directory of the printer (usually /usr/spool/*)
  457. in the file ``configuration''.
  458. If you have not made two directories for each printer, do so now.
  459. Make a portrait and landscape directory with owner root, group daemon
  460. and mode 775.
  461. You will need a
  462. configuration file in each spooling directory.  
  463. Our configuration file looks like
  464. .ID
  465. .ft CW
  466. {
  467.         readline        /dev/ttyi54
  468.         portraitfont    1204
  469.         portraitpitch   12
  470.         landscapefont   1217
  471.         landscapepitch  14
  472.         model           QMS1200
  473.         queuename       grumpy
  474.         class1          2 30
  475.         class2          2 11
  476.         class3          2
  477.         class4
  478. }
  479. .DE
  480. .ft R
  481. The stanza does not need a marker.  The ``readline'' value is the tty
  482. number of the line the software should read from (the tty line hooked
  483. to the debugger port).  The ``portraitfont'' and ``landscapefont'' are the
  484. ROM fonts to use in portrait and landscape mode when acting as a line
  485. printer.  The pitch values are the number of characters per inch in
  486. these fonts.  It can be a real number or an integer.  This needs to be
  487. set or a backspace-underline sequence won't work.  The model is the
  488. model of the QMS printer.  It should be ``QMS800'', ``QMS1200'', ``QMS1500'',
  489. or ``QMS2400''.
  490. Since the QMS 800 and QMS 1500 lasers scan
  491. the page in a direction perpendicular to
  492. the QMS 1200 and QMS 2400, they download fonts differently and the
  493. software needs to know which way to download fonts.  The ``queuename'' is
  494. the name of the queue this configuration file is for.  
  495. The class values are
  496. printer configuration options to turn on.  These values are
  497. automatically set by software so if they are not correct then they
  498. will be changed and you will get messages on your error file when the
  499. first job you print runs.  As previously mentioned, the class1 options
  500. are ignored because they cannot be set with software.  Set 
  501. the class 1 options as in
  502. step 4 above.
  503. .IP 12.
  504. Set up your ``/etc/printcap''.  You will need separate queue entries for 
  505. landscape and portrait mode.  Our printcap looks like
  506. .ft CW
  507. .ID
  508. grumpy|lp|QMS laser printer model number 2400:\e
  509.      :br#9600:fc#0177737:fs#040:xs#0460:xc#040000:\e
  510.      :mx#0:pl#66:pw#80:px#2550:py#3300:\e
  511.      :lp=/dev/ttyi62:\e
  512.      :if=/usr/local/lib/lpr/if:\e
  513.      :of=/usr/local/lib/lpr/of:\e
  514.      :gf=/usr/local/lib/lpr/gf:\e
  515.      :rf=/usr/local/lib/lpr/rf:\e
  516.      :df=/usr/local/lib/lpr/df:\e
  517.      :nf=/usr/local/lib/lpr/nf:\e
  518.      :tf=/usr/local/lib/lpr/tf:\e
  519.      :sd=/usr/spool/grumpy:\e
  520.      :af=/usr/adm/grumpyacct:
  521. grumpyl|QMS laser printer model number 2400 landscape:\e
  522.      :pl#66:pw#132:px#3300:py#2550:\e
  523.      :af=/usr/adm/grumpylacct:\e
  524.      :sd=/usr/spool/grumpyl:\e
  525.      :tc=grumpy:
  526. .DE
  527. .ft R
  528. Note the skillful use of the ``tc'' termcap entry.  Accounting is fully
  529. implemented.  Just add an ``af'' entry and accounting files will
  530. automatically get written (provided the accounting file is writable by
  531. daemon).  Make sure the tty bit entries ``fs'', ``fc'', ``xs'' and ``xc''
  532. are set correctly and that the baud rate entry, ``br'', matches the baud
  533. rate that you have set on the daughter board.  If you also name your
  534. printers after the seven dwarfs do not get more than seven printers.
  535. .PP
  536. You're done.
  537. The biggest problem I anticipate you having is that you cannot get flow
  538. control to work.  There is hope.  If you define the flag ``-DASCIILOAD''
  539. to the CFLAGS variable in the top level Makefile and re-install, the drivers
  540. will use only ASCII characters when downloading a font.  You can then
  541. turn on software flow control at a small performance cost.  You will also
  542. need to change the class 1 option from 2 and 30 to only 6 if you have a QMS
  543. 1200, 1500
  544. or 2400, or turn on bit 6 on switch SWS 1 if you have a QMS 800.
  545. You will also need to change the ``fc'', ``fs'', ``xs'' and ``xc'' entries
  546. in /etc/printcap to #0177776, #001, #040460 and #00, respectively.
  547. .PP
  548. If you wish to add characters to ditroff, you will need to select an unused
  549. font character position and insert the METAFONT source for the new character.
  550. You will also need to change the file ``tfm2difont.c'' in the ``src'' directory
  551. and add the new character to the table contained within it.
  552. You can create a table of character positions using the ``testfont.tex''
  553. file on the \*(TX distribution tape.
  554. Don't fill in the space character and
  555. don't add characters to octal 000 or 177 in a normal (i.e., not special)
  556. font because these positions are occupied by the ditroff \e| and \e^ 
  557. characters.
  558. That is, they won't show up on the table printout because they have width
  559. but no bitmap!
  560. .PP
  561. Some of the additional goodies you get with the code are useful.
  562. There is a version of ``eqnchar'' in the ``src'' directory that is 
  563. suitable for both otroff and ditroff.
  564. You will probably want to replace your system ``eqnchar.''
  565. Look at the libraries.  You might find some
  566. quite useful (especially the profile library).  Also, there are five
  567. programs in the src directory that are made and installed in the BINARIES
  568. directory:
  569. ``pktoch'', ``cati'',
  570. ``tfm2difont'', 
  571. ``tfm2ofont'' and ``dumpdesc''.  Pktoch prints out a symbolic dump of a 
  572. PK file
  573. just like pxtoch.  Tfm2difont converts a METAFONT TFM file to a ditroff
  574. width table file.  It is used in the Makefile in the font
  575. directories.
  576. Tfm2ofont converts a METAFONT TFM file to a C file which can be compiled and
  577. used as a width table for old troff.
  578. Dumpdesc symbolically prints out a dump of the ``DESC.out'' file.
  579. It's pretty worthless except for debugging.  
  580. Cati symbolically prints out the output of old troff, just like ``dvitype''
  581. does for DVI files.  It's pretty worthless too.
  582. .PP
  583. Any error messages output by the programs are pretty self-explanatory.
  584. Some of you may have trouble installing this software.  Since
  585. it has not been tested on a lot of systems, I expect this.  If you have
  586. trouble, please mail a message to the UUCP or ARPA address at the beginning of
  587. this file.  You can call me, but \fBI PREFER MAIL\fP.  
  588. Also, my phone number is subject to change at whim so you may have to do
  589. some hunting.
  590. If you find any bugs
  591. or things you really don't like, please tell me about them.
  592. Good
  593. luck.
  594.